package com.ayoka.ui.mine.setting;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.ayoka.R;
import com.ayoka.base.AppContext;
import com.ayoka.base.BaseActivity;
import com.ayoka.base.BasePresenter;
import com.ayoka.databinding.ActivitySettingBinding;
import com.jcp.baselibrary.model.ToolBarOptions;

/**
 * @author jcp
 * @ClassName: TopicListActivity
 * @Description:
 * @date 2018-12-28 下午4:21:18
 */
public class SettingActivity extends BaseActivity<ActivitySettingBinding, BasePresenter> {

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, SettingActivity.class);
        activity.startActivity(intent);
    }

    @Override
    public int getContentLayout() {
        return R.layout.activity_setting;
    }


    @Override
    protected void initViews() {
        mDataBinding.tvAboutAyoka.setOnClickListener(this);
        mDataBinding.tvAboutMoon.setOnClickListener(this);
        mDataBinding.btnQuit.setOnClickListener(this);
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        ToolBarOptions options = new ToolBarOptions("设置");
        setCustomToolBar(mDataBinding.customToolbar.toolbar, options);
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        if (view == mDataBinding.tvAboutAyoka) {
        }
        if (view == mDataBinding.tvAboutMoon) {
        }
        if (view == mDataBinding.btnQuit) {
            AppContext.logout(this);
            finish();
        }
    }
}
